<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Db;

class Goods extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];
    public function goods_list(){
        $where['xtension_money'] = array('gt',0);
        $list = Db::name("shop_goods")->where($where)->select();
        $config = get_addon_config('alioss');
        foreach ($list as $k=>$v){
            if($v['image']){
                $list[$k]['image'] = $config['cdnurl'].$v['image'];
            }
        }
        $this->success('请求成功',$list);
    }
}
